﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using ADC.BL;
using System.Text;
using ADC.DAL;

namespace ADC.Web
{
    public partial class Default : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                BindData();
            }
        }

        private void BindData()
        {
            List<Product> products = ProductFactory.GetAllHot();
            ListViewProducts.DataSource = products;
            ListViewProducts.DataBind();

            List<DAL.Project> projects = ProjectFactory.GetAll();
            ListViewProject.DataSource = projects;
            ListViewProject.DataBind();

            List<Slide> banners = SlideFactory.GetAll();
            listBanner.DataSource = banners;
            listBanner.DataBind();
        }
    }
}